# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=vala
pkgver=0.56.1
pkgrel=0
pkgdesc="Compiler for the GObject type system"
url="https://wiki.gnome.org/Projects/Vala"
arch="all"
license="LGPL-2.0-or-later"
subpackages="$pkgname-dbg $pkgname-doc"
depends="glib-dev"
makedepends="libxslt-dev bash flex bison gobject-introspection-dev graphviz-dev"
checkdepends="dbus-x11"
source="https://download.gnome.org/sources/vala/${pkgver%.*}/vala-$pkgver.tar.xz"

prepare() {
	default_prepare
	# 2 failures
	sed -i "/constants\/member-access/d" \
		tests/Makefile.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
83c34ab0497a9b7a627db8c1dbfea9e76c94b902e298afb2c30ba9824717f2fe3b0e26b987feb93cd4ff0ce211d0ecd9a746cc18c00e41c4c6fd01d05947902f  vala-0.56.1.tar.xz
"
